<%--
  @desc: 系统用户列表
  @author: chenw
  @create: 2014-5-26 AM 11:44
--%>
<%@ page contentType="text/html;charset=utf-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<style type="text/css">
    .keywords {
        width: 250px;
        font-family: '微软雅黑', sans-serif, serif;
    }
</style>
<div class="pageHeader">
    <form rel="pageForm" onsubmit="return navTabSearch(this);" action="<c:url value='/user/list'/>" method="post">
        <div class="searchBar">
            <ul>
                <li style="float: left;line-height: 25px;">
                    <label style="width: 50px;">关键字：</label>
                    <input name="keywords" type="text" value="${query.keywords}" placeholder="请输入姓名、电话、部门进行检索" class="keywords"/>
                </li>
                <li  style="float: left;line-height: 25px;">
                    <select id="reg" name="reg">
                        <option value="0" >全部</option>
                        <option value="1" >已签到</option>
                        <option value="2" >未签到</option>
                    </select>
                </li>
                <li>
                    <div class="buttonActive" style="margin-left: 5px;">
                        <div class="buttonContent">
                            <button type="submit">查找</button>
                        </div>
                    </div>
                </li>
            </ul>
        </div>
    </form>
</div>
<div class="panelBar">
    <ul class="toolBar" style="float: left;display: inline-block;">
        <li><a class="delete" href="<c:url value='/user/del/{sel_id}'/>" target="ajaxDel" title="是否确认删除当前签到信息？"><span>删除签到记录</span></a></li>
    </ul>
</div>
    <table class="table" width="100%" layoutH="114">
        <thead>
        <tr>
            <th width="40" align="center">序号</th>
            <th width="120" align="center">部门</th>
            <th width="80" align="center">姓名</th>
            <th width="60" align="center">性别</th>
            <th width="100" align="center">联系方式</th>
            <th width="140" align="center">签到时间</th>
            <th>签到地点</th>
            <th width="40" align="center">操作</th>
        </tr>
        </thead>
        <tbody>
        <c:forEach var="user" items="${pager.list}" varStatus="vs">
            <tr target="sel_id" rel="${user.userId}">
                <td>${vs.count+(pager.pageNum-1)*pager.numPerPage}</td>
                <td>${user.bm}</td>
                <td>${user.xm}</td>
                <td>${user.xb}</td>
                <td>${user.tel}</td>
                <td>${user.time}</td>
                <td>${user.address}</td>
                <td> <a href="<c:url value='/user/edit/${user.id}'/>" target="dialog" rel="page_user_edit"
                        width="380" height="80" mask="true"resizable="false"
                        maxable="false" title="信息编辑">编辑</a>
                </td>
            </tr>
        </c:forEach>
        </tbody>
    </table>
    <div class="panelBar">
        <div class="pages">
            <span>显示&nbsp;</span>
            <label for="cob_ps"></label>
        <select id="cob_ps" class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
            <option value="20">20</option>
            <option value="50" >50</option>
            <option value="100">100</option>
            <option value="200">200</option>
        </select>
            <span>条，共${pager.total}条</span>
        </div>
        <div class="pagination" targetType="navTab" totalCount="${pager.total}" numPerPage="${pager.numPerPage}" pageNumShown="10"
             currentPage="${pager.pageNum}"></div>
    </div>
    <form id="pagerForm" method="post" action="<c:url value='/user/list'/>">
        <input type="hidden" name="pageNum" value="${pager.pageNum}"/>
        <input type="hidden" name="keywords" value="${query.keywords}"/>
        <input type="hidden" name="numPerPage" value="${pager.numPerPage}"/>
        <input type="hidden" name="reg" value="${query.reg}"/>
    </form>
</div>
<script>
    $("#cob_ps option[value='${pager.numPerPage}']").attr("selected", true);
    $("#reg option[value='${query.reg}']").attr("selected", true);
</script>